<%--
    Document   : danhmuc_danhsach
    Created on : Nov 23, 2011, 8:51:21 PM
    Author     : kydrenw
--%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<div class="box-head">Danh Mục Sản Phẩm</div>
<form action="danhmuc.htm" method="post" name="frm_timdm" id="frm_timdm" onsubmit="return check_tim_sp()" class="formSearch">
    <div>
        <span>
            <input type="hidden" name="action" value="timkiem"/>
            <input name="txttukhoa" type="search" id="txttukhoa" onclick="this.value=''" placeholder="Tìm ..."/>
            <input type="submit" name="Submit" value="" class="btn btnSearch" title="Tìm"/>
        </span>
        <span>
            <input type="button" value="" class="btn btnAdd" onclick="window.location='danhmuc.htm?action=them'" title="Thêm danh mục"/>
        </span>
    </div>
</form>

<table width="100%">
        <tr>
            <td class="tbhead">Tên</td>
            <td class="tbhead">Xóa</td>
            <td class="tbhead">Chỉnh sửa</td>
        </tr>
        <c:forEach var="item" items="${ds}">
            <tr>
                <td class="tbcontent">${item.ten}</td>
                <td class="tbcontent textcenter">
                    <c:if test="${item.xoa==1}">
                        <img src="/images/isdel.png"/>
                    </c:if>
                </td>
                <td class="tbcontent">
                    <input title="Sửa" type="button" class="btn btnEdit" onclick="window.location='danhmuc.htm?action=sua&ma=${item.ma}'"/>
                    <input title="Bỏ xóa" type="button" class="btn btnSubmit" onclick="window.location='danhmuc.htm?action=check&ma=${item.ma}'"/>
                    <input title="Xóa" type="button" class=" btn btnDel" onclick="return confirm('Bạn có chắc chắn muốn xóa không ?'), window.location='danhmuc.htm?action=xoa&ma=${item.ma}'"/>
                </td>
            </tr>
        </c:forEach>
</table>